﻿using System.Web;
using System.Web.Routing;
using Agile.Paypal.Web.Services;

namespace Agile.Paypal.Web
{
    public class PaypalIpnRouteHandler : IRouteHandler
    {
        private readonly IPaypalNotificationProcessor _processor;

        public PaypalIpnRouteHandler(IPaypalNotificationProcessor processor)
        {
            _processor = processor;
          
        }

        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            return new PaypalIpnHttpHandler(_processor);
        }
    }
}